/**
 * Created by Administrator on 2017/5/2/002.
 */
let class2type = {}
let toString = class2type.toString
// let hasOwn = class2type.hasOwnProperty;
let method = {
  type: function (obj) {
    return toString.call(obj).slice(8, -1).toLowerCase()
  },
  isPlainObject: function isPlainObject (obj) {
    if (this.type(obj) === 'object') {
      for (let attr in obj) {
        return true
      }
      return false
    }
    return false
  },
  isObject: function (obj) {
    if (this.type(obj) === 'object') {
      return true
    }
    return false
  },
  isFunction: function (obj) {
    if (this.type(obj) === 'function') {
      return true
    }
    return false
  },
  isArray: function (obj) {
    if (this.type(obj) === 'array') {
      return true
    }
    return false
  },
  isSet: function (obj) {
    if (this.type(obj) === 'Set') {
      return true
    }
    return false
  },
  isMap: function (obj) {
    if (this.type(obj) === 'Map') {
      return true
    }
    return false
  },
  isMobile: function () {

  },
  isAndroid: function () {

  },
  isIos: function () {

  },
  fadeInOut: function (title) {
    alert(title)
  }
}
export default method
